<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:calli="http://callimachusproject.org/rdf/2009/framework#">
<head>
    <title>New SQL Datasource</title>
    <link rel="help" href="../../callimachus-for-web-developers#Datasource" target="_blank" title="Help" />
</head>
<body>
    <h1>New SQL Datasource</h1>
    <form role="form" method="POST" action="" enctype="application/rdf+xml" typeof="calli:SqlDatasource"
            onsubmit="return calli.saveResourceAs(event,calli.slugify($('#label').val()))">
        <div class="row">
            <fieldset class="col-sm-4">
                <div class="form-group">
                    <label for="label">Label</label>
                    <div class="controls">
                        <input type="text" class="form-control" id="label" value="{rdfs:label}" required="required" autofocus="autofocus" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="comment">Comment</label>
                    <div class="controls">
                        <textarea id="comment" class="form-control">{rdfs:comment}</textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="jdbcUrl">JDBC URL</label>
                    <div class="controls">
                        <input type="text" class="form-control" id="jdbcUrl" value="{calli:jdbcUrl}" required="required" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="driverClassName">Driver class name</label>
                    <div class="controls">
                        <input type="text" class="form-control" id="driverClassName" value="{calli:driverClassName}" required="required" />
                    </div>
                </div>
                <div id="driverJar" dropzone="link s:text/uri-list" class="form-group"
                        ondrop="return calli.insertResource(event)">
                    <label>Driver jar file <a href="/?view" title="Browse"
                            onclick="return calli.selectResource(event)" class="glyphicon glyphicon-folder-open" /></label>
                    <div rel="calli:driverJar" class="controls">
                        <span resource="?driverJar" class="ui-state-highlight ui-corner-all">
                            <span property="rdfs:label" />
                            <a href="{?driverJar}" title="Don't use this jar" onclick="return calli.removeResource(event)" class="glyphicon glyphicon-remove" />
                        </span>
                    </div>
                </div>
            </fieldset>
            <fieldset class="col-sm-4">
                <div class="form-group">
                    <label for="validationQuery">Validation query</label>
                    <div class="controls">
                        <input type="text" class="form-control" id="validationQuery" value="{calli:validationQuery}" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="maxActive">Max active</label>
                    <div class="controls">
                        <input type="integer" class="form-control" id="maxActive" value="{calli:maxActive}" datatype="xsd:integer" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="maxIdle">Max idle</label>
                    <div class="controls">
                        <input type="integer" class="form-control" id="maxIdle" value="{calli:maxIdle}" datatype="xsd:integer" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="maxWait">Max wait</label>
                    <div class="controls">
                        <input type="integer" class="form-control" id="maxWait" value="{calli:maxWait}" datatype="xsd:integer" />
                    </div>
                </div>
            </fieldset>
        </div>
        <div class="row">
            <fieldset class="col-sm-4">
                <div class="form-group">
                    <button id="create-datasource" type="submit" class="btn btn-success">Create</button>
                </div>
            </fieldset>
        </div>
    </form>
</body>
</html>
